import 'package:fish_redux/fish_redux.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:school_safe_teacher/Home/entity/news_entity.dart';
import 'package:school_safe_teacher/constans/constants.dart';
class NewsListState implements Cloneable<NewsListState> {
  bool editFocus;
  List<NewsEntity> items;
  int page = 1;

  ///刷新控制器
  EasyRefreshController easyRefreshController;

  String key;

  @override
  NewsListState clone() {
    return NewsListState()
      ..editFocus = editFocus
      ..items = items
      ..page = page
      ..key = key
      ..easyRefreshController = easyRefreshController;
  }
}

NewsListState initState(Map<String, dynamic> args) {
  return NewsListState()
    ..editFocus = args[Constants.FROM_SEARCH]
    ..items = []
    ..page = 1
    ..key = ""
    ..easyRefreshController = EasyRefreshController();
}
